package com.ysd.lis.controller.inv;

import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.inv.InvSupplier;
import com.ysd.lis.request.inv.InvSupplierDto;
import com.ysd.lis.request.inv.InvSupplierPageParam;
import com.ysd.lis.service.inv.InvSupplierService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author prs
 * @since 2024-09-10
 */
@Api(tags = "供应商")
@RestController
@RequestMapping("/lis/inv/supplier")
public class InvSupplierController extends BaseController {

    @Autowired
    InvSupplierService invSupplierService;
    @ApiOperation("分页查询")
    @GetMapping("/findInvSupplierPageList")
    public Result findInvSupplierPageList(InvSupplierPageParam pageParam){
        return invSupplierService.findInvSupplierPageList(pageParam);
    }

    @ApiOperation("分页查询")
    @GetMapping("/findInvSupplierList")
    public Result findInvSupplierList(InvSupplierPageParam pageParam){
        return invSupplierService.findInvSupplierList(pageParam);
    }
    @ApiOperation("新增")
    @PostMapping("/addInvSupplier")
    public Result addInvSupplier(@RequestBody InvSupplier supplier){
        return  invSupplierService.addInvSupplier(supplier);
    }

    @ApiOperation("修改")
    @PostMapping("/editInvSupplier")
    public Result editInvSupplier(@RequestBody InvSupplier supplier) {
        return invSupplierService.editInvSupplier(supplier);
    }

    @ApiOperation("根据详情id删除详情数据")
    @PostMapping("/deleteInvSupplier")
    public Result deleteInvSupplier(@RequestBody InvSupplier supplier) {
        return invSupplierService.deleteInvSupplier(supplier);
    }
    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteInvSupplierList")
    public Result batchDeleteInvSupplierList(@RequestBody InvSupplierDto dto){
        return  invSupplierService.batchDeleteInvSupplierList(dto);
    }



}
